The present invention relates generally to video compression, and more particularly, to MPEG decoding with embedded resizing that includes detecting and interpolating moving areas in interlaced video in order to eliminate irregularities in the output video.
Video compression incorporating a discrete cosine transform (DCT) and motion prediction is a technology that has been adopted in multiple international standards such as MPEG-1, MPEG-2, MPEG-4, and H.262. Among the various DCT/motion prediction video coding schemes, MPEG-2 is the most widely used, in DVD, satellite DTV broadcast, and the U.S. ATSC standard for digital television.
In some applications, it is desirable to display the decoded video at a smaller resolution than received. For example, in high definition television (HDTV) applications, there is increased interest in low cost MPEG decoders with high definition (HD) capacity and standard definition (SD) format output.
In the above applications, MPEG-2 decoders have been configured to include down scalers in order to reduce the resolution of the HD to the SD format. This down scaling has been performed externally or internally of the decoding loop. However, internally embedding the down scaling in the decoding loop is desirable to reduce the memory and computational power required to perform the decoding.
One example of a MPEG-2 decoder with embedded resizing is shown in FIG. 1. As can be seen, the decoder includes a first path made up of the variable-length decoder (VLD) 2, an inverse-scan and inverse-quantization (ISIQ) unit 4 and a 4×4 inverse discrete cosine transform (IDCT) unit 6. A second path is included made up of the VLD 2, down scaler 10 and ¼ pixel motion compensation unit 12. An adder 8 is also included that combines the outputs of the first and second paths to produce the output video.
During operation, the first path 2,4,6 produces intra coded frames and residual error frames, and the second path 2,10,12 produces motion compensated residual frames by performing motion compensation on reference frames stored in a frame store 14. In particular, the down scaler 10 scales down the motion vectors to the reduced resolution of the first path. Due to this down scaling, the motion vectors now have a ¼ pixel resolution. This means that non-integer pixel positions such as a “¼”, “½” or “¾” pixel position is capable of being retrieved from the reference frames when performing motion compensation.
Further, the ¼ pixel MC unit 12 than retrieves data from the reference frames stored in the frame store 14 according to the decoded motion vectors. If the motion vector (MV) is an integer value, the MC unit 12 will just retrieve the pixel values starting at the pixel position indicated by that MV. If the MV is not an integer, the MC unit 12 will retrieve pixel values at integer pixel positions neighboring the pixel position indicated by the MV and perform an interpolation to calculate the pixel values at the non-integer pixel positions. The pixel values resulting from this interpolation is the actual data that corresponds to the non-integer MV.
It should also be noted that MPEG-2 supports interlaced video. Thus, on the decoder side, either field MC or frame MC is performed depending on what was done on the encoder side. As can be seen from FIG. 2, in field MC, data from each field is fetched separately and then interlaced into data blocks. In frame MC, interlaced data from both fields is fetched at the same time.